/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.com.cliente.contacto.estructura;

import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.data.fields.DataSourceTextField;

/**
 *
 * @author dloaiza
 */
public class ContactoDS extends DataSource {

    public static final String IDENTIFICACION = "identificacion";
    public static final String NOMBRE = "nombre";
    public static final String APELLIDO1 = "apellido1";
    public static final String APELLIDO2 = "apellido2";
    public static final String TELEFONO = "telefono";
    public static final String EXTENSION = "extension";
    public static final String TELEFONOCELULAR = "telefonoCelular";
    public static final String CORREO = "correo";
    public static final String TIPODOCUMENTO = "tipoDocumento";
    
    public ContactoDS()
    {
        DataSourceTextField identificacionDSField = new DataSourceTextField(IDENTIFICACION, "identificacion");
        DataSourceTextField nombreDSField = new DataSourceTextField(NOMBRE, "nombre");
        DataSourceTextField apellido1DSField = new DataSourceTextField(APELLIDO1, "apellido1");
        DataSourceTextField apellido2DSField = new DataSourceTextField(APELLIDO2, "apellido2");
        DataSourceTextField telefonoDSField = new DataSourceTextField(TELEFONO, "telefono");
        DataSourceTextField extensionDSField = new DataSourceTextField(EXTENSION, "extension");
        DataSourceTextField telefonoCelularDSField = new DataSourceTextField(TELEFONOCELULAR, "telefonoCelular");
        DataSourceTextField correoDSField = new DataSourceTextField(CORREO, "correo");
        DataSourceTextField tipoDocumentoDSField = new DataSourceTextField(TIPODOCUMENTO, "tipoDocumento");

        identificacionDSField.setPrimaryKey(true);
        setFields(identificacionDSField, nombreDSField, apellido1DSField, apellido2DSField, telefonoDSField, extensionDSField, telefonoCelularDSField, correoDSField, tipoDocumentoDSField);
        setClientOnly(true);
    }
}